include ../Makefile.config
all: dirprep
	@becho "Building external libraries..."
	make -C nspireio
	make -C lualib
	make -C luajitlib
	@becho "External library building complete."

dirprep: dist

dist:
	@becho "Creating needed directories..."
	mkdir -p dist dist/include dist/lib dist/bin

clean:
	@becho "Cleaning up external library builds..."
	make -C nspireio clean
	make -C lualib clean
	make -C luajitlib clean
	rm -rf dist

distclean:
	@becho "Cleaning up all of the external library builds..."
	make -C nspireio distclean
	make -C lualib distclean
	make -C luajitlib distclean
	rm -rf dist

